package com.fyh.feign.fallback;

import com.fyh.constant.MessageConstant;
import com.fyh.entity.common.Result;
import com.fyh.entity.job.JobPositionRequest;
import com.fyh.entity.job.SimpleJobPosition;
import com.fyh.entity.user.JobFavorite;
import com.fyh.feign.CandidateJobFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
public class CandidateJobFeignClientFallback implements CandidateJobFeignClient {

    @Override
    public Result<Boolean> getDeliveryExist(Long positionId, Long userId) {
        System.out.println(MessageConstant.GET_DELIVERY_EXIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_DELIVERY_EXIST_FAILED);
    }

    @Override
    public Result deliveryVitae(Long positionId, Long userId) {
        System.out.println(MessageConstant.DELIVERY_VITAE_FAILED);
        throw new RuntimeException(MessageConstant.DELIVERY_VITAE_FAILED);
    }

    @Override
    public Result<List<SimpleJobPosition>> getSimpleJobListByPositionId(List<JobFavorite> jobFavoriteList) {
        System.out.println(MessageConstant.GET_SIMPLE_JOB_LIST_BY_POSITION_ID_FAILED);
        throw new RuntimeException(MessageConstant.GET_SIMPLE_JOB_LIST_BY_POSITION_ID_FAILED);
    }

    @Override
    public Result<Long> getEmployerIdByPositionId(Long positionId) {
        System.out.println(MessageConstant.GET_EMPLOYER_ID_BY_POSITION_ID_FAILED);
        throw new RuntimeException(MessageConstant.GET_EMPLOYER_ID_BY_POSITION_ID_FAILED);
    }
}
